<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    protected function _initDocType() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        
        $view->doctype('XHTML1_STRICT');
    }
    
    protected function _initTitle() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        
        $view->headTitle('Bento Gonçalves Táxis');
    }


    protected function _initMeta() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        
        $view->headMeta()->appendName('content-type', 'text/html; charset=utf-8');
        $view->headMeta()->appendName('content-language', 'pt, pt-br');
        $view->headMeta()->appendName('cache-control', 'public');
        $view->headMeta()->appendName('imagetoolbar', 'no');
        $view->headMeta()->appendName('content-script-type', 'text/javascript');
        $view->headMeta()->appendName('content-style-type', 'text/css');
        $view->headMeta()->appendName('DC.title', 'Umanizzare');
        $view->headMeta()->appendName('DC.creator', 'ADS 2010');
        $view->headMeta()->appendName('DC.creator.address', 'analise@bento.ifrs.edu.br');
        $view->headMeta()->appendName('DC.subject', '');
        $view->headMeta()->appendName('DC.description', '');
        $view->headMeta()->appendName('author', 'ADS 2010');
        $view->headMeta()->appendName('language', 'pt-br');
        $view->headMeta()->appendName('classification', 'Internet');
        $view->headMeta()->appendName('robots', 'index, follow');
        $view->headMeta()->appendName('rating', 'general');
        $view->headMeta()->appendName('copyright', 'ADS 2010');
        $view->headMeta()->appendName('doc-rights', 'Public');
        $view->headMeta()->appendName('geo.region', 'RS');
        $view->headMeta()->appendName('geo.placename', 'Bento Gon&ccedil;alves');
        $view->headMeta()->appendName('distribution', 'Global');
        $view->headMeta()->appendName('revisit-after', '1 day');
        $view->headMeta()->appendName('keywords', '');
    }
    
    protected function _initVariables(){
         date_default_timezone_set('America/Sao_Paulo');
    }
    
    protected function _initFavIcon() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        
        $view->headLink()->headLink(array('rel' => 'favicon', 'href' => $view->baseUrl(). '/favicon.ico'));
    }
    
    protected function _initCss() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        
        $view->headLink()->appendStylesheet($view->baseUrl().'/css/principal.css');
        $view->headLink()->appendStylesheet($view->baseUrl().'/css/smoothness/jquery-ui-1.8.16.custom.css');
    }
    
    protected function _initJavaScript() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        
      
        $view->headScript()->appendFile($view->baseUrl().'/js/utils.js');
        $view->headScript()->appendFile($view->baseUrl().'/js/jquery-1.6.2.min.js');
        $view->headScript()->appendFile($view->baseUrl().'/js/jquery-ui-1.8.16.custom.min.js');        
        $view->headScript()->appendFile($view->baseUrl().'/js/jquery-1.2.6.pack.js');
        $view->headScript()->appendFile($view->baseUrl().'/js/jquery.maskedinput-1.1.4.pack.js');
        $view->headScript()->appendFile($view->baseUrl().'/js/main.js');
        
    }
    
    protected function _initSessions(){
        Zend_Session::Start();
//        SCOPE OF USER:
//        $user = new Zend_Session_Namespace('user');
//        $user->name="anonymous";
//        $user->password="";
        
    }
}
